//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

package org.ryzom.nel.misc;

public class CLine {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLine(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLine obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CLine(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setV0(CVector value) {
    nelmiscJNI.CLine_V0_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getV0() {
    return new CVector(nelmiscJNI.CLine_V0_get(swigCPtr, this), true);
  }

  public void setV1(CVector value) {
    nelmiscJNI.CLine_V1_set(swigCPtr, this, CVector.getCPtr(value), value);
  }

  public CVector getV1() {
    return new CVector(nelmiscJNI.CLine_V1_get(swigCPtr, this), true);
  }

  public CLine() {
    this(nelmiscJNI.new_CLine__SWIG_0(), true);
  }

  public CLine(CVector v0, CVector v1) {
    this(nelmiscJNI.new_CLine__SWIG_1(CVector.getCPtr(v0), v0, CVector.getCPtr(v1), v1), true);
  }

  public void project(CVector inV, CVector outV) {
    nelmiscJNI.CLine_project(swigCPtr, this, CVector.getCPtr(inV), inV, CVector.getCPtr(outV), outV);
  }

}
